﻿#region 命名空间

using System;
using WinnerCMS.BLL;
using WinnerCMS.Common;

#endregion

namespace WinnerCMS.WebUI.Templates.WinnerCMS6.Member
{
    public partial class PasswordModify : WebFactory.ClientPublicPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = WebConfig.SiteName + "→ 会员中心 → 修改密码";
            if (RightsCheck.IsLogined == false)
            {
                MsgBox.Message("登录超时，请重新登录。", "Login.aspx", this);
            }
        }

        protected void btnOK_Click(object sender, EventArgs e)
        {
            string Err = null;
            new Public_Member(false).PasswordModify(UserManage.Current.UserName, this.txtOldPSW.Text, this.txtPSW1.Text,
                this.txtPSW2.Text, ref Err);

            if (string.IsNullOrEmpty(Err) == false)
            {
                MsgBox.Message(Err, this.UpdatePanel1);
            }
            else
            {
                MsgBox.Message("修改成功", this.UpdatePanel1);
            }
        }
    }
}